import { defineStore, createPinia } from 'pinia';
import storage from 'good-storage';
import { theme } from '@/constants'
import { ThemeInt } from '@/types'

interface AppStoreInt {
  theme: ThemeInt
}

export const useAppStore = defineStore({
  id: 'app',
  state: (): AppStoreInt => ({
    theme: storage.get('there', theme),
  }),
  getters: {
    getTheme: (state) => state.theme
  },
  actions: {
  },
})

export const store = createPinia()